
import {createAxiosByInterceptors} from "./request";
import {BACKEND_PREFIX} from "../config";

const request = createAxiosByInterceptors({
  baseURL: BACKEND_PREFIX,
  // baseURL: "http://youngya.top:7000",
});

export function getHomeworkList(props: {
  loginname: string;
  password: string;
}) {
  const {loginname, password} = props;
  return request.post(`/getHomework`, {
    loginname,
    password,
  });
}

export function getOnlineTestList(props: {
  loginname: string;
  password: string;
}){
  const {loginname, password} = props;
  return request.post(`/getOnlineTest`, {
    loginname,
    password,
  });
}
